package com.demo.service;

import com.demo.dto.TestResults;
import org.mybatis.spring.SqlSessionTemplate;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by 86187 on 2020/4/8.
 */

@Service
public class TestServiceImpl implements TestService  {

    @Autowired
    private SqlSessionTemplate sqlSessionTemplate;


    @Override
    public List<TestResults> findInfo(String id) {
        //定义mapper地址及方法
        final String template = "TestMapper.findInfo";
        List<TestResults> results = sqlSessionTemplate.selectOne(template,id);
        return  results;
    }

}
